<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>eRPC API Reference: erpc::ManuallyConstructed&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">eRPC API Reference
   &#160;<span id="projectnumber">Rev. 1.5.0</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classerpc_1_1_manually_constructed.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classerpc_1_1_manually_constructed-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">erpc::ManuallyConstructed&lt; T &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__infra.html">Infrastructure</a> &raquo; <a class="el" href="group__infra__utility.html">Utilities</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Allocates static storage for an object.  
 <a href="classerpc_1_1_manually_constructed.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="manually__constructed_8h_source.html">manually_constructed.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad0f1fba50f90689d05d169f2eaac1d9a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_manually_constructed.html#ad0f1fba50f90689d05d169f2eaac1d9a">destroy</a> ()</td></tr>
<tr class="memdesc:ad0f1fba50f90689d05d169f2eaac1d9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invoke the object's destructor.  <a href="#ad0f1fba50f90689d05d169f2eaac1d9a">More...</a><br /></td></tr>
<tr class="separator:ad0f1fba50f90689d05d169f2eaac1d9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Object access</div></td></tr>
<tr class="memitem:ac5045237e0867e21bfdef2a5a23df142"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5045237e0867e21bfdef2a5a23df142"></a>
T *&#160;</td><td class="memItemRight" valign="bottom"><b>get</b> ()</td></tr>
<tr class="separator:ac5045237e0867e21bfdef2a5a23df142"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace0f2a61405e12c756c548942c288ba6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ace0f2a61405e12c756c548942c288ba6"></a>
const T *&#160;</td><td class="memItemRight" valign="bottom"><b>get</b> () const </td></tr>
<tr class="separator:ace0f2a61405e12c756c548942c288ba6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f960ae91504b07806c552c617875763"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7f960ae91504b07806c552c617875763"></a>
T *&#160;</td><td class="memItemRight" valign="bottom"><b>operator-&gt;</b> ()</td></tr>
<tr class="separator:a7f960ae91504b07806c552c617875763"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a332eb2de50fe5be72f61031e1d593ec0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a332eb2de50fe5be72f61031e1d593ec0"></a>
const T *&#160;</td><td class="memItemRight" valign="bottom"><b>operator-&gt;</b> () const </td></tr>
<tr class="separator:a332eb2de50fe5be72f61031e1d593ec0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b5d26a5a373605901123a06f591fe8a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b5d26a5a373605901123a06f591fe8a"></a>
T &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator*</b> ()</td></tr>
<tr class="separator:a7b5d26a5a373605901123a06f591fe8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4bef24af70a8babc0ffd315d464cb0f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac4bef24af70a8babc0ffd315d464cb0f"></a>
const T &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator*</b> () const </td></tr>
<tr class="separator:ac4bef24af70a8babc0ffd315d464cb0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07edd05d3c9e8212e53d14eb31d9be96"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a07edd05d3c9e8212e53d14eb31d9be96"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>operator T *</b> ()</td></tr>
<tr class="separator:a07edd05d3c9e8212e53d14eb31d9be96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6303f1d1ca8f2d2677e47165ddbeb2da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6303f1d1ca8f2d2677e47165ddbeb2da"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>operator const T *</b> () const </td></tr>
<tr class="separator:a6303f1d1ca8f2d2677e47165ddbeb2da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Explicit construction methods</div></td></tr>
<tr class="memitem:afbe05669f528563f3c40ac3fbb7e6caf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afbe05669f528563f3c40ac3fbb7e6caf"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>construct</b> ()</td></tr>
<tr class="separator:afbe05669f528563f3c40ac3fbb7e6caf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a088f76ae970f1c5d4d392d364612f955"><td class="memTemplParams" colspan="2"><a class="anchor" id="a088f76ae970f1c5d4d392d364612f955"></a>
template&lt;typename A1 &gt; </td></tr>
<tr class="memitem:a088f76ae970f1c5d4d392d364612f955"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>construct</b> (const A1 &amp;a1)</td></tr>
<tr class="separator:a088f76ae970f1c5d4d392d364612f955"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63b46c89577795f6ee3d3bc1303e010f"><td class="memTemplParams" colspan="2"><a class="anchor" id="a63b46c89577795f6ee3d3bc1303e010f"></a>
template&lt;typename A1 , typename A2 &gt; </td></tr>
<tr class="memitem:a63b46c89577795f6ee3d3bc1303e010f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>construct</b> (const A1 &amp;a1, const A2 &amp;a2)</td></tr>
<tr class="separator:a63b46c89577795f6ee3d3bc1303e010f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2647883ac3a74186e3c24a199cae09c9"><td class="memTemplParams" colspan="2"><a class="anchor" id="a2647883ac3a74186e3c24a199cae09c9"></a>
template&lt;typename A1 , typename A2 , typename A3 &gt; </td></tr>
<tr class="memitem:a2647883ac3a74186e3c24a199cae09c9"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>construct</b> (const A1 &amp;a1, const A2 &amp;a2, const A3 &amp;a3)</td></tr>
<tr class="separator:a2647883ac3a74186e3c24a199cae09c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b2a90add53fb6d3eb87a45740ddb6b4"><td class="memTemplParams" colspan="2"><a class="anchor" id="a8b2a90add53fb6d3eb87a45740ddb6b4"></a>
template&lt;typename A1 , typename A2 , typename A3 , typename A4 &gt; </td></tr>
<tr class="memitem:a8b2a90add53fb6d3eb87a45740ddb6b4"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>construct</b> (const A1 &amp;a1, const A2 &amp;a2, const A3 &amp;a3, const A4 &amp;a4)</td></tr>
<tr class="separator:a8b2a90add53fb6d3eb87a45740ddb6b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab05586fce056b9fa87510fe9553beb4"><td class="memTemplParams" colspan="2"><a class="anchor" id="aab05586fce056b9fa87510fe9553beb4"></a>
template&lt;typename A1 , typename A2 , typename A3 , typename A4 , typename A5 &gt; </td></tr>
<tr class="memitem:aab05586fce056b9fa87510fe9553beb4"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>construct</b> (const A1 &amp;a1, const A2 &amp;a2, const A3 &amp;a3, const A4 &amp;a4, const A5 &amp;a5)</td></tr>
<tr class="separator:aab05586fce056b9fa87510fe9553beb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a6d220c46013cfd6f7713013c3a77e592"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classerpc_1_1_manually_constructed.html#a6d220c46013cfd6f7713013c3a77e592">m_storage</a> [(sizeof(T)+sizeof(uint64_t)-1)/sizeof(uint64_t)]</td></tr>
<tr class="memdesc:a6d220c46013cfd6f7713013c3a77e592"><td class="mdescLeft">&#160;</td><td class="mdescRight">Storage for the object.  <a href="#a6d220c46013cfd6f7713013c3a77e592">More...</a><br /></td></tr>
<tr class="separator:a6d220c46013cfd6f7713013c3a77e592"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class T&gt;<br />
class erpc::ManuallyConstructed&lt; T &gt;</h3>

<p>Allocates static storage for an object. </p>
<p>This template class defines storage of the template class' size. Then it gives the user explicit control over construction and destruction of the object residing in that storage. This is useful for placing objects in unions, or other situations where you need static storage but want to delay the actual construction of the object.</p>
<p>Objects of this class will act as a pointer to the template argument class type. Of course, if the object has not yet been constructed then the behaviour is undefined if the pointer to it is used.</p>
<p>Note that there is not a constructor or deconstructor. This is because members of unions cannot have constructors or deconstructors.</p>
<p>Instances of this template class are aligned to 8 bytes. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad0f1fba50f90689d05d169f2eaac1d9a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classerpc_1_1_manually_constructed.html">erpc::ManuallyConstructed</a>&lt; T &gt;::destroy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Invoke the object's destructor. </p>
<p>Behaviour is undefined if the objected was not previously initialized. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a6d220c46013cfd6f7713013c3a77e592"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint64_t <a class="el" href="classerpc_1_1_manually_constructed.html">erpc::ManuallyConstructed</a>&lt; T &gt;::m_storage[(sizeof(T)+sizeof(uint64_t)-1)/sizeof(uint64_t)]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Storage for the object. </p>
<p>An array of uint64 is used to get 8-byte alignment. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="manually__constructed_8h_source.html">manually_constructed.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
